package it.patterns.behavioral.observer;

/**
 * Define a one-to-many dependent between objects so that when one object
 * changes state, all its dependents are notified and updated automatically. THe
 * key objects in this pattern are subject and observer. A subject may have any
 * number of dependent observers. All observers are notified whenever the
 * subject undergoes a change in state. In response each observer will query the
 * subject to synchronize its state with the subject's state.<br/>
 * 
 * This kind of interaction is also known as publish-subscribe. This subject is
 * the publisher of notifications. It sends out these notifications without
 * having to know who its observers are. Any number of observers can subscribe
 * to receive notifications.
 * 
 * <img src="Observer.jpg" alt="Pattern Structure"/>
 * 
 * @author Luca D'Onofrio
 * 
 * @category Behavioral Pattern
 * @see "Design Patterns - Element of Reusable Object Oriented Software (Gamma,Helm, Johnson, Vlissides)"
 * 
 * @version 1.0
 * 
 */
public interface Observer {
	public void update(Subject subject);

}
